@extends('home.base.person')
@section('content')
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

		<title>发表评论</title>
		<link href="{{ asset('assets/css/bootstrap.min.css') }}" rel="stylesheet" />
		<link href="../AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
		<link href="../AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">
		<link href="../css/personal.css" rel="stylesheet" type="text/css">
		<link href="../css/appstyle.css" rel="stylesheet" type="text/css">
		
		<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
	</head>
	<body>
		@if(session('msg'))
	 	<div class='alert alert-block alert-success' style="color:green;">
	 		{{ session('msg') }}
	 		<i class='icon'></i>
	 	</div>
	 	@endif
     	<div >
		<div >
			<div >
				<div class="user-comment">
					<!--标题 -->
					<div class="am-cf am-padding">
						<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">发表评论</strong> / <small>Make&nbsp;Comments</small></div>
					</div>
					<hr/>
					<!-- 遍历所有未评论的订单 -->
					@foreach($order as $o)
					<form action="{{ url('home/comment') }}" method='post'>
						{{ csrf_field() }}
					<input type="hidden" name = 'oid' value="{{ $o->id }}">
					<div class="comment-main">
						<!-- 遍历订单下的商品 -->
						@foreach($o->goods as $g)
						<input type="hidden" name = 'uid' value="{{ session('id') }}">
						<input type="hidden" name = 'did' value="{{ $g->id }}">
						<div class="comment-list">
							<div class="item-pic">
								<a href="#" class="J_MakePoint">
									<img src="{{ url('admin/upload/'.$g->pic) }}" class="itempic">
								</a>
							</div>
							<div class="item-title">
								<div class="item-name">
									<a href="#">
										<p class="item-basic-info">{{ $g->title }}</p>
									</a>
								</div>
								<div class="item-info">
									<div class="item-price">
										价格：<strong>{{ $g->price }}元</strong>
									</div>										
								</div>
							</div>
							<div class="clear"></div>
							<div class="item-comment">
								<textarea name = 'content' placeholder="请写下对宝贝的感受吧，对他人帮助很大哦！"></textarea>
							</div>
							<div class="item-opinion">
								<input type="radio" name="cmt" value = 1 class="am-radio-inline">好评</li>
								<input type="radio" name="cmt" value = 2 class="am-radio-inline">中评</li>
								<input type="radio" name="cmt" value = 3 class="am-radio-inline">差评</li>
							</div>
						</div>
						@endforeach												
							<div class="info-btn">
								<button class="am-btn am-btn-danger" type="submit">发表评论</button>
							</div>						
					</div>
					</form>
					@endforeach
				</div>
			</div>
		</div>
		</div>
	</body>
</html>
@endsection